package com.example.chcrm.entity.consignor;

import com.baomidou.mybatisplus.annotation.*;
import com.example.chcrm.entity.common.OperateRecord;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Author 邹
 * @Date 2025/4/20 1:46
 * @Version 1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class CustomerInfo implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.INPUT)
    private String id;
    @Excel(name = "委托商名称")
    @NotBlank(message = "委托商名称不能为空")
    private String customerName;    //委托商名称
    @Excel(name = "委托商简称")
    @NotBlank(message = "委托商简称不能为空")
    private String customerSimple;  //委托商简
    @NotBlank(message = "类型不能为空")
    private String typeId;          //类型id
    @Excel(name = "类型")
    @NotBlank(message = "类型不能为空")
    private String typeName;        //类型名称
    @Excel(name = "联系电话")
    @NotBlank(message = "联系电话不能为空")
    private String telephone;       //联系电话
    private String mailbox;         //邮箱
    private String address;     //详细地址
    @TableField("audit_status")
    private Integer auditStatus;    //审核状态 1待审核 2已通过 3已拒绝 4已取消
    @Excel(name = "状态")
    private Integer status;         //状态 0:待审核 1：合作中 2：已退出
    @TableLogic(value = "0",delval = "-1")
    private Integer isDeleted;       //是否删除
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @OrderBy
    private Date createTime;        //创建时间
    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;        //修改时间
    @TableField(exist = false)
    private String stateStr;        //状态展示
    /**
     * 分页默认值
     */
    @TableField(exist = false)
    private Integer page = 1;
    @TableField(exist = false)
    private Integer rows = 10;

    /**
     * 操作说明
     */
    @TableField(exist = false)
    @NotBlank(message = "操作说明不能为空")
    private String explains;
    /**
     * 操作记录
     */
    @TableField(exist = false)
    private List<OperateRecord> operateRecordList;

    /**
     * 状态
     */
    @TableField(exist = false)
    private  String statusStr;
}